package com.sg.dto.integration.app;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Objects;

/**
 * @desc CycleStageAttaPicDto
 * @使用场景
 */
@Data
public class CycleStageAttaPicDto extends BaseDto implements Serializable {

    /**
     * 文档ID
     */
    @ApiModelProperty("文档ID")
    private String unstructuredDataId;

    /**
     * 文件相对路径地址
     */
    @ApiModelProperty("文件相对路径地址")
    private String fileRelativePathAccess;

    private String fileRelativeAllPathAccess;

    /**
     * 周期阶段资料记录ID
     */
    @ApiModelProperty("周期阶段资料记录ID")
    private String cycleStageDataId;

    /**
     * 资料图片概要明细地址
     */
    @ApiModelProperty("资料图片概要明细地址")
    private String summaryDataPic;

    /**
     * 文档后缀
     */
    @ApiModelProperty("文档后缀")
    private String postfix;

    /**
     * 来源文档关系ID
     */
    @ApiModelProperty("来源文档关系ID")
    private String sourceRelationshipId;

    /**
     * 关系类型编码 DIRECT_RELATION:直接关系 INDIRECT_RELATIONSHIP:间接关系
     */
    @ApiModelProperty("关系类型编码")
    private String relationshipType;

    /**
     * 是否是网盘引用关系 TRUE:是 FALSE:否
     */
    @ApiModelProperty("是否是网盘引用关系")
    private String isNetworkReference;

    /**
     * 文档名称
     */
    @ApiModelProperty("文档名称")
    private String unstructuredDataName;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        CycleStageAttaPicDto that = (CycleStageAttaPicDto) o;
        return (
                unstructuredDataId == that.unstructuredDataId &&
                        fileRelativePathAccess == that.fileRelativePathAccess &&
                        fileRelativeAllPathAccess == that.fileRelativeAllPathAccess &&
                        cycleStageDataId == that.cycleStageDataId &&
                        summaryDataPic == that.summaryDataPic &&
                        postfix == that.postfix &&
                        sourceRelationshipId == that.sourceRelationshipId &&
                        relationshipType == that.relationshipType &&
                        isNetworkReference == that.isNetworkReference &&
                        unstructuredDataName == that.unstructuredDataName
        );
    }

    @Override
    public int hashCode() {
        return Objects.hash(
                super.hashCode(),
                unstructuredDataId,
                fileRelativePathAccess,
                fileRelativeAllPathAccess,
                cycleStageDataId,
                summaryDataPic,
                postfix,
                sourceRelationshipId,
                relationshipType,
                isNetworkReference,
                unstructuredDataName
        );
    }

}
